package moodle.android;

import net.patrickpollet.moodlews.core.LoginReturn;
import net.patrickpollet.moodlews.core.Mdl_soapserverBindingStub;

public class Usuario {
	/*Clase Sesion para obtener Moodle y Sesion*/
	private String usuario;
	private String contrasena;	
	private static final String MOODLE_SERVICE=Constantes.MOODLE_URL+"wspp/service_pp2.php";
	private static final String MOODLE_NAMESPACE=Constantes.MOODLE_URL+"wspp/wsdl2/";
	static Mdl_soapserverBindingStub moodle= new Mdl_soapserverBindingStub(MOODLE_SERVICE,MOODLE_NAMESPACE, Constantes.WS_DEBUG);				
	static LoginReturn sesion;
	
	
	public Usuario(String user, String pass){
		//this.moodle = new Mdl_soapserverBindingStub(MOODLE_SERVICE,MOODLE_NAMESPACE, Constantes.WS_DEBUG);				
		this.sesion =moodle.login(user, pass);
		this.usuario = user;
		this.contrasena = pass;
	}
	
	public Usuario(){
		
	}
	
	public String getUsr(){		
		return this.usuario;
	}
	
	public String getPass(){
		return this.contrasena;
	}
	
	public LoginReturn getSesion(){
		return this.sesion;
	}
	
	public Mdl_soapserverBindingStub getMoodle(){
		return this.moodle;
	}
	
}
